/* Prints a table of squares using a while statement */
#include <stdio.h>
int main(void)
{
    int i = 1, n;
    printf("This program prints table of squares.\n");
    printf("Enter number of entries in table: ");
    scanf("%d", &n);
    while (i <= n) {
        printf("%10d%10d\n", i, i * i);
        i++;
    }
    return 0;
}